package com.zhentao.day02.am;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

public class HashSetTest {
  public static void main(String[] args) {


    String str = "Hello";
    System.out.println("\"hello\".compareTo(str) = " + "hello".compareTo(str));
    /*Set set1 = new HashSet(); // HashSet添加元素是无序的
    set1.add("d");
    set1.add("b");
    set1.add("c");

    System.out.println(set1);

    Set set2 = new LinkedHashSet(); // LinkedHashSet 添加元素是有序

    set2.add("d");
    set2.add("b");
    set2.add("c");
    System.out.println(set2);*/

  }
}
